from rest_framework import serializers
from apps.found_person.models import Recruit


class RecruitSerializer(serializers.ModelSerializer):
    class Meta:
        model = Recruit
        fields = '__all__'


class EnterpriseSerializer(serializers.ModelSerializer):
    recruits = RecruitSerializer(many=True)


class RecruitEnterpriseSerializer(serializers.ModelSerializer):
    enterprise = EnterpriseSerializer(label='企业')

    class Meta:
        model = Recruit
        fields = '__all__'
